package com.company;

public class Test05条件运算符 {
    public static void main(String[] args) {
            System.out.println(chengji(98));
            System.out.println(chengji(67));
            System.out.println(chengji(59));
    }

    /**
     * 条件运算符
     * @param x
     * @return
     */
    public static String chengji (int x){
        return x >= 90 ? "A" :((x > 60&&x < 89) ? "B" : "C");
    }
}
